Skip to content

Conversation

@shawnhathaway
Copy link
Contributor

@shawnhathaway shawnhathaway commented Jul 23, 2020

What changed?

  • Add version_partition column to MySQL/Postgres schema_version and schema_update_history tables.
  • Convert MySQL REPLACE INTO usage to INSERT ON DUPLICATE KEY UPDATE for the writeSchemaVersionQuery.

Why?
We will need to change schema creation behavior in the future to support Vitess as we cannot perform schema structure CRUD operations over the mysql interface. However this ensures we have the correct key structure for the future.

How did you test it?
Existing CLI Schema Update Unit Tests

@shawnhathaway shawnhathaway requested review from a team, alexshtin and samarabbas July 23, 2020 22:54
Copy link
Contributor

@alexshtin alexshtin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't quite understand the purpose but from code prospective it looks ok.

@shawnhathaway
Copy link
Contributor Author

shawnhathaway commented Jul 24, 2020

I don't quite understand the purpose but from code prospective it looks ok.

Clarified in person :) This is necessary to keep all records pinned to a single shard in case the tables need to be present in a sharded Vitess keyspace (they do currently).

@shawnhathaway shawnhathaway merged commit 9865b53 into temporalio:master Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants